import request from '@/common/request/request.js'
import config from '@/common/config/config.js';
const http = config.env

// 验证码图片
export const getCaptchaImage = data => {
	return request({
		url: `${http.baseUrl}/captchaImage`,
		method: 'get',
        data
	})
}
// 注册
export const login = data => {
	return request({
		url: `${http.baseUrl}/oauth/register`,
		method: 'post',
        data
	})
}
// 注册
export const register = data => {
	return request({
		url: `${http.baseUrl}/oauth/register`,
		method: 'post',
        data
	})
}
// 重置密码
export const changePwd = data => {
	return request({
		url: `${http.baseUrl}/oauth/forgot/password`,
		method: 'post',
        data
	})
}
// 提现
export const toWithdrawal = data => {
	return request({
		url: `${http.baseUrl}/withdrawal/add`,
		method: 'post',
        data
	})
}
// 提现历史
export const withDrawalHistory = data => {
	return request({
		url: `${http.baseUrl}/withdrawal/list`,
		method: 'get',
        data
	})
}
// 观看视频记录
export const lookVideoRecord = data => {
	return request({
		url: `${http.baseUrl}/advert/list`,
		method: 'get',
        data
	})
}

// 看完视频后，获取到了奖励，回调这个接口
export const lookVideoGetMoney = data => {
	return request({
		url: `${http.baseUrl}/advert/brush`,
		method: 'post',
        data
	})
}

// 今天刷了多少个视频
export const lookVideoTotal = data => {
	return request({
		url: `${http.baseUrl}/advert/todayList`,
		method: 'get',
        data
	})
}
// 兑换优惠券
export const exchangeCoupon = data => {
	return request({
		url: `${http.baseUrl}/coupon/convertCoupon`,
		method: 'post',
        data
	})
}

// 兑换记录
export const exchangeCouponList = data => {
	return request({
		url: `${http.baseUrl}/coupon/list`,
		method: 'get',
        data
	})
}

